@model MediaSettingsModel

@{
    //page title
    ViewBag.Title = T("Admin.Configuration.Settings.Media").Text;
    //active menu item (system name)
    Html.SetActiveMenuItemSystemName("Media settings");
}


<form asp-controller="Setting" asp-action="Media" method="post">
    <div class="content-header clearfix">
        <h1 class="pull-left">
            @T("Admin.Configuration.Settings.Media")
        </h1>
        <div class="pull-right">
            <button type="submit" name="save" class="btn bg-blue">
                <i class="fa fa-floppy-o"></i>
                @T("Admin.Common.Save")
            </button>
            @await Component.InvokeAsync("AdminWidget", new { widgetZone = AdminWidgetZones.MediaSettingsButtons })
        </div>
    </div>

    <div class="content">
        <div class="form-horizontal">
            @await Component.InvokeAsync("StoreScopeConfiguration")
            @await Component.InvokeAsync("SettingMode")
            <div asp-validation-summary="All"></div>

            <div class="panel-group">
                @await Component.InvokeAsync("AdminWidget", new { widgetZone = AdminWidgetZones.MediaSettingsTop })
                <div class="panel panel-default">
                    <div class="panel-heading">
                        @T("Admin.Configuration.Settings.Media.BlockTitle.Common")
                    </div>
                    <div class="panel-body">
                        <div class="form-group">
                            <div class="col-md-3">
                                <nop-label asp-for="PicturesStoredIntoDatabase" />
                            </div>
                            <div class="col-md-1">
                                <div class="form-text-row">
                                    @if (Model.PicturesStoredIntoDatabase)
                                    {
                                        @T("Admin.Configuration.Settings.Media.PicturesStoredIntoDatabase.Database")
                                    }
                                    else
                                    {
                                        @T("Admin.Configuration.Settings.Media.PicturesStoredIntoDatabase.FileSystem")
                                    }
                                </div>
                            </div>
                            <div class="col-md-8">
                                <button type="submit" id="change-picture-storage" name="change-picture-storage" class="btn btn-primary">
                                    @T("Admin.Configuration.Settings.Media.PicturesStoredIntoDatabase.Change")
                                </button>
                                <nop-action-confirmation asp-button-id="change-picture-storage" />
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-9 col-md-offset-3">
                                <span>@T("Admin.Configuration.Settings.Media.PicturesStoredIntoDatabase.Note")</span>
                            </div>
                        </div>
                        <div class="form-group advanced-setting">
                            <div class="col-md-3">
                                <nop-override-store-checkbox asp-for="MaximumImageSize_OverrideForStore" asp-input="MaximumImageSize" asp-store-scope="@Model.ActiveStoreScopeConfiguration" />
                                <nop-label asp-for="MaximumImageSize" />
                            </div>
                            <div class="col-md-9">
                                <nop-editor asp-for="MaximumImageSize" />
                                <span asp-validation-for="MaximumImageSize"></span>
                            </div>
                        </div>
                        <div class="form-group advanced-setting">
                            <div class="col-md-3">
                                <nop-override-store-checkbox asp-for="MultipleThumbDirectories_OverrideForStore" asp-input="MultipleThumbDirectories" asp-store-scope="@Model.ActiveStoreScopeConfiguration" />
                                <nop-label asp-for="MultipleThumbDirectories" />
                            </div>
                            <div class="col-md-9">
                                <nop-editor asp-for="MultipleThumbDirectories" />
                                <span asp-validation-for="MultipleThumbDirectories"></span>
                            </div>
                        </div>
                        <div class="form-group advanced-setting">
                            <div class="col-md-3">
                                <nop-override-store-checkbox asp-for="DefaultImageQuality_OverrideForStore" asp-input="DefaultImageQuality" asp-store-scope="@Model.ActiveStoreScopeConfiguration" />
                                <nop-label asp-for="DefaultImageQuality" />
                            </div>
                            <div class="col-md-9">
                                <nop-editor asp-for="DefaultImageQuality" />
                                <span asp-validation-for="DefaultImageQuality"></span>
                            </div>
                        </div>
                        <div class="form-group advanced-setting">
                            <div class="col-md-3">
                                <nop-override-store-checkbox asp-for="ImportProductImagesUsingHash_OverrideForStore" asp-input="ImportProductImagesUsingHash" asp-store-scope="@Model.ActiveStoreScopeConfiguration" />
                                <nop-label asp-for="ImportProductImagesUsingHash" />
                            </div>
                            <div class="col-md-9">
                                <nop-editor asp-for="ImportProductImagesUsingHash" />
                                <span asp-validation-for="ImportProductImagesUsingHash"></span>
                            </div>
                        </div>
                        <div class="form-group advanced-setting">
                            <div class="col-md-3">
                                <nop-override-store-checkbox asp-for="DefaultPictureZoomEnabled_OverrideForStore" asp-input="DefaultPictureZoomEnabled" asp-store-scope="@Model.ActiveStoreScopeConfiguration" />
                                <nop-label asp-for="DefaultPictureZoomEnabled" />
                            </div>
                            <div class="col-md-9">
                                <nop-editor asp-for="DefaultPictureZoomEnabled" />
                                <span asp-validation-for="DefaultPictureZoomEnabled"></span>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="panel panel-default advanced-setting">
                    <div class="panel-heading">
                        @T("Admin.Configuration.Settings.Media.BlockTitle.Product")
                    </div>
                    <div class="panel-body">
                        <div class="form-group">
                            <div class="col-md-3">
                                <nop-override-store-checkbox asp-for="ProductDetailsPictureSize_OverrideForStore" asp-input="ProductDetailsPictureSize" asp-store-scope="@Model.ActiveStoreScopeConfiguration" />
                                <nop-label asp-for="ProductDetailsPictureSize" />
                            </div>
                            <div class="col-md-9">
                                <nop-editor asp-for="ProductDetailsPictureSize" />
                                <span asp-validation-for="ProductDetailsPictureSize"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-3">
                                <nop-override-store-checkbox asp-for="ProductThumbPictureSize_OverrideForStore" asp-input="ProductThumbPictureSize" asp-store-scope="@Model.ActiveStoreScopeConfiguration" />
                                <nop-label asp-for="ProductThumbPictureSize" />
                            </div>
                            <div class="col-md-9">
                                <nop-editor asp-for="ProductThumbPictureSize" />
                                <span asp-validation-for="ProductThumbPictureSize"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-3">
                                <nop-override-store-checkbox asp-for="ProductThumbPictureSizeOnProductDetailsPage_OverrideForStore" asp-input="ProductThumbPictureSizeOnProductDetailsPage" asp-store-scope="@Model.ActiveStoreScopeConfiguration" />
                                <nop-label asp-for="ProductThumbPictureSizeOnProductDetailsPage" />
                            </div>
                            <div class="col-md-9">
                                <nop-editor asp-for="ProductThumbPictureSizeOnProductDetailsPage" />
                                <span asp-validation-for="ProductThumbPictureSizeOnProductDetailsPage"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-3">
                                <nop-override-store-checkbox asp-for="AssociatedProductPictureSize_OverrideForStore" asp-input="AssociatedProductPictureSize" asp-store-scope="@Model.ActiveStoreScopeConfiguration" />
                                <nop-label asp-for="AssociatedProductPictureSize" />
                            </div>
                            <div class="col-md-9">
                                <nop-editor asp-for="AssociatedProductPictureSize" />
                                <span asp-validation-for="AssociatedProductPictureSize"></span>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="panel panel-default advanced-setting">
                    <div class="panel-heading">
                        @T("Admin.Configuration.Settings.Media.BlockTitle.OtherPages")
                    </div>
                    <div class="panel-body">
                        <div class="form-group">
                            <div class="col-md-3">
                                <nop-override-store-checkbox asp-for="CategoryThumbPictureSize_OverrideForStore" asp-input="CategoryThumbPictureSize" asp-store-scope="@Model.ActiveStoreScopeConfiguration" />
                                <nop-label asp-for="CategoryThumbPictureSize" />
                            </div>
                            <div class="col-md-9">
                                <nop-editor asp-for="CategoryThumbPictureSize" />
                                <span asp-validation-for="CategoryThumbPictureSize"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-3">
                                <nop-override-store-checkbox asp-for="ManufacturerThumbPictureSize_OverrideForStore" asp-input="ManufacturerThumbPictureSize" asp-store-scope="@Model.ActiveStoreScopeConfiguration" />
                                <nop-label asp-for="ManufacturerThumbPictureSize" />
                            </div>
                            <div class="col-md-9">
                                <nop-editor asp-for="ManufacturerThumbPictureSize" />
                                <span asp-validation-for="ManufacturerThumbPictureSize"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-3">
                                <nop-override-store-checkbox asp-for="VendorThumbPictureSize_OverrideForStore" asp-input="VendorThumbPictureSize" asp-store-scope="@Model.ActiveStoreScopeConfiguration" />
                                <nop-label asp-for="VendorThumbPictureSize" />
                            </div>
                            <div class="col-md-9">
                                <nop-editor asp-for="VendorThumbPictureSize" />
                                <span asp-validation-for="VendorThumbPictureSize"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-3">
                                <nop-override-store-checkbox asp-for="CartThumbPictureSize_OverrideForStore" asp-input="CartThumbPictureSize" asp-store-scope="@Model.ActiveStoreScopeConfiguration" />
                                <nop-label asp-for="CartThumbPictureSize" />
                            </div>
                            <div class="col-md-9">
                                <nop-editor asp-for="CartThumbPictureSize" />
                                <span asp-validation-for="CartThumbPictureSize"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-3">
                                <nop-override-store-checkbox asp-for="MiniCartThumbPictureSize_OverrideForStore" asp-input="MiniCartThumbPictureSize" asp-store-scope="@Model.ActiveStoreScopeConfiguration" />
                                <nop-label asp-for="MiniCartThumbPictureSize" />
                            </div>
                            <div class="col-md-9">
                                <nop-editor asp-for="MiniCartThumbPictureSize" />
                                <span asp-validation-for="MiniCartThumbPictureSize"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-3">
                                <nop-override-store-checkbox asp-for="AvatarPictureSize_OverrideForStore" asp-input="AvatarPictureSize" asp-store-scope="@Model.ActiveStoreScopeConfiguration" />
                                <nop-label asp-for="AvatarPictureSize" />
                            </div>
                            <div class="col-md-9">
                                <nop-editor asp-for="AvatarPictureSize" />
                                <span asp-validation-for="AvatarPictureSize"></span>
                            </div>
                        </div>
                    </div>
                </div>
                @await Component.InvokeAsync("AdminWidget", new { widgetZone = AdminWidgetZones.MediaSettingsBottom })
            </div>
        </div>
    </div>
</form>